HAL DCACHE types migration

This section provides information about the HAL DCACHE types migration.

HAL DCACHE callback ID type definition

HAL1

HAL2

typedef enum
{
  HAL_DCACHE_CLEAN_BY_ADDRESS_CB_ID
  HAL_DCACHE_INVALIDATE_BY_ADDRESS_CB_ID
  HAL_DCACHE_CLEAN_AND_INVALIDATE_BY_ADDRESS_CB_ID
  HAL_DCACHE_INVALIDATE_COMPLETE_CB_ID
  HAL_DCACHE_ERROR_CB_ID
  HAL_DCACHE_MSPINIT_CB_ID
  HAL_DCACHE_MSPDEINIT_CB_ID
} HAL_DCACHE_CallbackIDTypeDef;
  • Removed from HAL2: the callback registration is managed by dedicated functions for each DCACHE event. For more details, see : HAL DCACHE Callbacks register functions

  • HAL_DCACHE_MSPINIT_CB_ID and HAL_DCACHE_MSPDEINIT_CB_ID are removed because the functions HAL_DCACHE_MspInit() and HAL_DCACHE_MspDeInit() are removed.


HAL DCACHE state type definition

HAL1

HAL2

typedef enum
{
  HAL_DCACHE_STATE_RESET
  HAL_DCACHE_STATE_READY
  HAL_DCACHE_STATE_BUSY
  HAL_DCACHE_STATE_TIMEOUT
  HAL_DCACHE_STATE_ERROR
} HAL_DCACHE_StateTypeDef;
typedef enum
{
  HAL_DCACHE_STATE_RESET
  HAL_DCACHE_STATE_IDLE
  HAL_DCACHE_STATE_ACTIVE // To indicate that the cache is active
  // Removed
  // Removed
  HAL_DCACHE_STATE_MAINTENANCE // New state introduced to indicate that the cache is active and a maintenance operation is ongoing
} hal_dcache_state_t;

Related concepts:


HAL DCACHE handle type definition

HAL1

HAL2

DCACHE_HandleTypeDef;
hal_dcache_handle_t;

Related concept:


HAL DCACHE initialization type definition

HAL1

HAL2

DCACHE_InitTypeDef;

Removed in HAL2.

In HAL1, the ReadBurstType was duplicated in DCACHE_InitTypeDef and HAL_DCACHE_SetReadBurstType().

In HAL2, user can set the ReadBurstType directly in the dedicated function:

hal_status_t HAL_DCACHE_SetReadBurstType(hal_dcache_handle_t *hdcache, hal_dcache_read_burst_t read_burst_type)

HAL DCACHE callback type definition

HAL1

HAL2

pDCACHE_CallbackTypeDef
hal_dcache_cb_t